<?php
class GoodsCateListWidget extends YWidget{
	public $count = 10;
	public $parent = null;
	public $title = '商品分类';
	public $class = null;
	
	protected $cate_list = null;
	public function run(){
		$this->load_resource();
		
		$mod = new GoodsCateModel();
		$condition = array('site_id' => SITE_ID);
		if($this->parent !== null){
			$condition['parent'] = $this->parent;
		}
		$fl = null;
		$order = array('rank' => 1);
		$this->cate_list = $mod->find($condition, $fl, 0, $this->count, $order);
		$this->render($this->class_name . '/' . $this->tpl);
	}
}

?>